<script setup>
import { Terminal } from 'xterm';
import { FitAddon } from 'xterm-addon-fit';

const term = new Terminal();
const fitAddon = new FitAddon();
term.loadAddon(fitAddon);

// Open the terminal in #terminal-container
setTimeout(() => {
    term.open(document.getElementById('xterm-container'));
}, 1000)

// Make the terminal's size and geometry fit the size of #terminal-container
fitAddon.fit();
</script>

<template>
    <div id="xterm-container"></div>
</template>

<style scoped>
</style>